home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
mac
/
LOGIC Apple II 5.25" Library - ProDOS
/
PRO009.dsk
/
LEE
/
SET.DATE.bas
< prev
next >
Wrap
BASIC Source File
|
2012-02-16
|
1KB
|
27 lines
1 REM PROGRAM:SET DATE AND TIME
2 REM TO PRODOS WITHOUT A CLOCK CARD
3 REM
4 REM FOR PRODOS 1.1.0
5 REM WRITTEN BY MICHAEL LEE
6 REM 1985 03 30
7 TEXT : CLEAR : HOME : POKE 216,0:D$ = CHR$(4):
8 PRINT D$"FRE"
9 VTAB 2: PRINT "SET DATE AND TIME TO PRODOS"
10 VTAB 5: INPUT "CURRENT YEAR (1-99) ";A$:A = VAL(A$): IF A <1 OR A >99 THEN PRINT CHR$(7): GOTO 10
12 LY = (1900 +A)/4 = INT((1900 +A)/4)
14 YEAR = A
20 VTAB 6: INPUT "MONTH (1-12) ";A$:A = VAL(A$): IF A <1 OR A >12 THEN PRINT CHR$(7): GOTO 20
22 IF A >8 THEN UMTH = 1:LM = A -8: GOTO 26
24 UMTH = 0:LM = A:
26 MTH = A
30 VTAB 7: INPUT "DAY (1-31) ";A$:A = VAL(A$): IF A <1 OR A >31 THEN PRINT CHR$(7): GOTO 30
32 IF MTH = 2 AND NOT LY AND A >28 THEN PRINT CHR$(7): GOTO 30
34 IF (MTH = 4 OR MTH = 6 OR MTH = 9 OR MTH = 11) AND A >30 THEN PRINT CHR$(7): GOTO 30
36 DAY = A
40 DFIRST = LM *32 +DAY
42 DLAST = YEAR *2 +UMTH
44 M$ = "":MN = 47632 +(MTH) *3
45 FOR I = 0 TO 2:M$ = M$ + CHR$( PEEK(MN +I)): NEXT
46 DA$ = STR$(YEAR) +"-" +M$ +"-" + STR$(DAY)
48 VTAB 21: PRINT "DATE IS "DA$:
50 POKE 49040,DFIRST: POKE 49041,DLAST